package dinghan.workflow.action;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import dinghan.workflow.beans.ChuChai2;
import weaver.interfaces.workflow.action.Action;
import weaver.soa.workflow.request.RequestInfo;
import weaver.workflow.request.RequestManager;

public class TestAction implements Action {

	private static Log log = LogFactory.getLog(ChuChai2.class.getName());
	private RequestManager requestManager;
	
	@Override
	public String execute(RequestInfo request) {
		
		this.requestManager = request.getRequestManager();
		//String requestid = request.getRequestid();
		//int formid = requestManager.getFormid();
		String src = requestManager.getSrc();
		//int nNodeId = this.requestManager.getNextNodeid();
		int cNodeId = this.requestManager.getNodeid();
		
		log.error("当前NodeID：" + cNodeId);
		log.error("当前流程标题：" + requestManager.getRequestname());
		log.error(requestManager.getLastoperator());
		
		requestManager.setMessagecontent("返回自定义的错误信息");        
		requestManager.setMessageid("错误信息编号");
		//AutoChangeDocStatueAction(requestid, formid, src, cNodeId);
		
		
		return Action.SUCCESS;
		
	}
	
	

}
